home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lex / syntax.ml < prev   
Encoding:
Text File  |  1993-09-24  |  637 b   |  31 lines  |  [TEXT/MPS ]

  1. (* The shallow abstract syntax *)
  2.  
  3. type location =
  4.     Location of int * int
  5. ;;
  6.  
  7. type regular_expression =
  8.     Epsilon
  9.   | Characters of char list
  10.   | Sequence of regular_expression * regular_expression
  11.   | Alternative of regular_expression * regular_expression
  12.   | Repetition of regular_expression
  13. ;;
  14.  
  15. type lexer_definition =
  16.     Lexdef of location * (string * (regular_expression * location) list) list
  17. ;;
  18.  
  19. (* Representation of automata *)
  20.  
  21. type automata =
  22.     Perform of int
  23.   | Shift of automata_trans * automata_move vect
  24. and automata_trans =
  25.     No_remember
  26.   | Remember of int
  27. and automata_move =
  28.     Backtrack
  29.   | Goto of int
  30. ;;
  31.